package com.bao.work;

import java.util.Arrays;

/**
 * @author baoye
 * @date 2024-07-24/18:37
 */
public class StringClass05 {
    public static void main(String[] args) {
        String[] strings ={"bca","dadfa","dddaaa","你好啊","我来啦","你干嘛呢","别跑啊"};
        int num=0;
        for (int i = 0; i < strings.length; i++) {
            if(strings[i].length()>5){
                continue;
            }
            num++;
        }
        int index=0;
        String[] strings1=new String[num];
        for(int i=0;i<strings.length;i++){
            if(strings[i].length()>5){
                continue;
            }
            strings1[index]=strings[i];
            index++;
        }
        System.out.println(Arrays.toString(strings1));
    }


}
